package com.hnhegui.backend.order.convert;

import com.hnhegui.backend.entity.PageResult;
import com.hnhegui.backend.order.dto.response.OrderDocumentResponseDTO;
import com.hnhegui.backend.order.entity.OrderDocument;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import org.springframework.data.domain.Page;

/**
 * @author 刘大海
 * @since 2025/10/27 09:38
 */
@Mapper
public interface OrderConvert {
    OrderConvert INSTANCE = Mappers.getMapper(OrderConvert.class);

    PageResult<OrderDocumentResponseDTO> convertToPage(Page<OrderDocument> orderPage);

    OrderDocumentResponseDTO convertToDocument(OrderDocument order);
}
